<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Coach extends Model
{

    protected $table = 'coachs';
    protected $guarded = ['created_at','updated_at']; //黑名单

    /**
     * 所属驾校
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function school()
    {
        return $this->belongsTo('App\Models\School');
    }

    /**
     * 教练配置
     */
    public function config()
    {
        return $this->hasOne('App\Models\CoachConfig');
    }
}
